package com.frozenlab.android.wheretoeatai;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;

public class Main extends Activity {
	Resources res;
	private CharSequence[] items;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
    	res = getResources();
    	this.items = new CharSequence[] {
    			res.getString(R.string.Breakfast),
    			res.getString(R.string.Lunch),
    			res.getString(R.string.Dinner),
    			res.getString(R.string.Supper),
    			res.getString(R.string.Refreshment),
    			res.getString(R.string.Supper),
    			res.getString(R.string.Others)};
    }
    
    public void onMyFoodPlacesClick(View button){	
    	Intent intent = new Intent();
    	intent.setClass(this,FoodPlaceList.class);
    	startActivity(intent);  	
    }
    
    public void onAskClick(View button){
/*    	AlertDialog.Builder builder = new AlertDialog.Builder(this);
    	builder.setTitle(this.res.getString(R.string.Pick_category));
    	builder.setItems(this.items, new DialogInterface.OnClickListener() {
    	    public void onClick(DialogInterface dialog, int item) {
    	        Toast.makeText(getApplicationContext(), items[item], Toast.LENGTH_SHORT).show(); */
    	        askAI();
/*    	    }
    	});
    	AlertDialog alert = builder.create();
    	alert.show(); */
    }
    
    public void askAI(){
    	Intent intent = new Intent();
    	intent.setClass(this,AskAI.class);
    	startActivity(intent);
    }
}